<?php
function db_connect(){
    $use_dbver='5.0';
    $db_char='utf8';
    $db_dbname='log';
    $link=@mysql_connect('db-log-ro.cdn35.com:33064','redis','feeyo');
    if(!$link){
        echo"Cann't connect to DB!";
        exit();
    }
    //编码
    if($use_dbver>='4.1'){
        $q='';
        if($db_char){
            $q='character_set_connection='.$db_char.',character_set_results='.$db_char.',character_set_client=binary';
        }
        if($use_dbver>='5.0'){
            $q.=(empty($q)?'':',').'sql_mode=\'\'';
        }
        if($q){
            @mysql_query('SET '.$q);
        }
    }
    @mysql_select_db($db_dbname);
    mysql_query("set wait_timeout=2880000") or die(mysql_error());
    mysql_query("set interactive_timeout=24*3600*30") or die(mysql_error());
    return $link;
}

$sql="select
 result.id
,result.FlightNum3
,result.FlightNum2
,result.Registration
,result.DepCode
,ArrCode
,result.Lat
,result.Lng
,result.Speed
,result.Altitude
from
(
select
 a.id
,a.FlightNum3
,a.FlightNum2
,a.Registration
,a.DepCode,ArrCode
,a.Lat
,a.Lng
,a.Speed
,a.Altitude
,@v_rownum := @v_rownum+1
,if(@V_Registration=a.Registration,@v_rank:=@v_rank+1,@v_rank:=1) as 'rank_num'
,@V_Registration:=a.Registration
from
(
select
id,
FlightNum3,
FlightNum2,
Registration,
DepCode,ArrCode,
Lat,
Lng,
Speed,
Altitude
from `fa_airnav_".date('Ymd')."`
where DataSource='Veryzhun_YTY' and `Lat`<>0 and `Lng`<>0 and Registration <>''
order by Registration, id desc
)a,
(
select @v_rank:=0,@v_rownum:=0,@V_Registration:=null
) b
) result
where result.rank_num=1";
$link = db_connect();
$result = mysql_query ($sql, $link);

$result_array = array();
while(($tmp = mysql_fetch_assoc($result)) !== false) {
	$temp = array();
	$temp['flight'] = $tmp['Registration'];
	$temp['x'] = $tmp['Lng'];
	$temp['y'] = $tmp['Lat'];
	$temp['speed'] = $tmp['Speed'];
	$temp['height'] = $tmp['Altitude'];
	$result_array[$tmp['Registration']] = $temp;
}

// 给js准备数据
$result_array = json_encode($result_array);
?>


<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=d279tZEmgEjv5ZgQrQLVjGvH"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/library/CurveLine/1.5/src/CurveLine.min.js"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/library/DistanceTool/1.2/src/DistanceTool_min.js"></script>
	<script type="text/javascript" src="js/jquery.js"></script>
    <title>航线图</title>
    <style type="text/css">

		body,html{width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
		#first_container{width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:99999}
		#second_container{width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:99999}
		#third_container{width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:99}
		#fourth_container{width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:99}
		#r-result{width:160px;margin-top:5px;position:absolute;top:40%;left:10px;z-index:99999999999}
		#r-height{width:160px;margin-top:5px;position:absolute;top:40%;right:10px;z-index:99999999999}
		.view_control,.height_control{
			padding:6px 0 6px 0;
			background-color:#5c75a9;
			border-top:solid #8a9cc2 1px;
			text-align:center;
			color:#ffffff;
			cursor:pointer;
		}
		
		div.view_control:active,div.height_control:active{
			background-color:#4f6aa3;
		}
		div.BMap_scaleTxt{
			color:white !important;
		}
		.BMap_pop{
			background-color:red !important;
		}
		
		/*除去百度logo旁边的字符*/
		.BMap_cpyCtrl{display: none;} 
    </style>
</head>
<body>
<div id="first_container"></div>

<div id="r-result">
	<div class="view_control">海军BN05南北航线图</div>
	<div class="view_control">航线图</div>
	<div class="view_control">进离场图</div>
	<div class="view_control">城市图</div>
</div>

<div id="r-height">
	<div class="height_control" onclick="height_control(0);">所有飞机</div>
	<div class="height_control" onclick="height_control(6000);">高度低于6千米飞机</div>
</div>
	<script type="text/javascript">
		window.air_line = <?php echo $result_array;?>;
		window.height_set = 0;

		function height_control(height){
			window.height_set = height;
			set_airline(first_map,air_line);
		}
		function get_source(){
			$.ajax({
				url:"source.php?a="+Math.random(),
				type:"get", 
				timeout:30000,
				dataType:"json",
				success:function(result){
					window.air_line = result;
				}
			});
		}

		setInterval("get_source()", 15000);
		setInterval("set_airline(first_map,air_line)", 5000); 
		//setInterval("remove_airline(first_map,air_line)", 2000); 
	
	style_json = [
			          {
		                    "featureType": "all",
		                    "elementType": "all",
		                    "stylers": {
		                              "hue": "#000000",
		                              "color":"#000000",
		                              "visibility": "off"
		                    }
			          }
				];
	window.onload = view_control;
	function view_control(){
		paint_circle();//画心圆
		$(".view_control").eq(0).css({"background-color":'#4f6aa3'});
		$(".view_control").eq(0).data('checked','on');
	}

	$(".view_control").click(function(){
		var content_index = $(this).index();
		first_map.clearOverlays();
		paint_airline(first_map,air_line);
		paint_circle();//画心圆
		if ($(this).data('checked') == 'on') {
			$(this).css({"background-color":''});
			$(this).data('checked', 'off');
			$(".view_control").each(function(tmp){
				if (tmp != content_index && $(this).data('checked') == 'on') {
					if (tmp == 0) {
						paint_action(first_map,first_point_array);
					} else if (tmp == 1) {
						paint_action(first_map,second_point_array);
					}else if (tmp == 2) {
						paint_action(first_map,third_point_array,label_array);
					}else if (tmp == 3) {
						paint_action(first_map,fourth_point_array);
					}
				}
			})
		} else {
			$(this).css({"background-color":'#4f6aa3'});
			$(this).data('checked', 'on');
			
			$(".view_control").each(function(tmp){
				if ($(this).data('checked') == 'on') {
					if (tmp == 0) {
						paint_action(first_map,first_point_array);
					} else if (tmp == 1) {
						paint_action(first_map,second_point_array);
					}else if (tmp == 2) {
						paint_action(first_map,third_point_array,label_array);
					}else if (tmp == 3) {
						paint_action(first_map,fourth_point_array);
					}
				}
			})
		}
	})
	
	function paint_circle(){
		for(var i = 15 ;i>=1;i--) {
			var circle = new BMap.Circle(new BMap.Point(119.7197, 32.5633),(10000*i),{fillColor:"", strokeWeight: 1 ,fillOpacity: 1, strokeOpacity:0.4,strokeColor:'red'});
			first_map.addOverlay(circle);
		}
	}

	function paint_action(map,point_array,label_array){
		// 处理批注
		for(tmp in label_array){
			var opts = {
			  position : new BMap.Point(label_array[tmp].x, label_array[tmp].y),    // 指定文本标注所在的地理位置
			  offset   : new BMap.Size(label_array[tmp].offset_x, label_array[tmp].offset_y)    //设置文本偏移量
			}
			var label = new BMap.Label(label_array[tmp].text, opts);  // 创建文本标注对象
			label.setStyle({
				 color : label_array[tmp].color,
				 fontSize : label_array[tmp].fontSize,
				 height : label_array[tmp].height,
				 lineHeight : label_array[tmp].lineHeight,
				 border:'none',
				 backgroundColor:'',
				 fontWeight:'bold',
				 transform: label_array[tmp].transform
			 });
			map.addOverlay(label);
		}

		for(city_name in point_array){
			// 画点
			var point = new BMap.Point(point_array[city_name].x, point_array[city_name].y);
			// map.setCenter(point);
			 if(point_array[city_name].icon == 'default' || point_array[city_name].icon == undefined) {
				var marker = new BMap.Marker(point);
			} else if(point_array[city_name].icon != ''){
				var myIcon = new BMap.Icon("./images/"+point_array[city_name].icon+".png", new BMap.Size(10,10));// 
				var marker = new BMap.Marker(point,{icon:myIcon});
			} else {
				// 没有图标的用黑色点
				var myIcon = new BMap.Icon("./images/black_point.png", new BMap.Size(10,10));// 
				var marker = new BMap.Marker(point,{icon:myIcon});
			}

			map.addOverlay(marker);  // 将标注添加到地图中
			var label = new BMap.Label(point_array[city_name].name,{offset:new BMap.Size(15,0)});
			label.setStyle({color:point_array[city_name].name_color,fontSize : "10px",border:'none',backgroundColor:'',fontWeight:'bold'});
			marker.setLabel(label);
			map.addOverlay(marker);

			// 画线
			if(point_array[city_name].relation != undefined && point_array[city_name].relation != '') {
				var relation_tmp = point_array[city_name].relation.split('-');
				var relation_array = [];
				for(var j = 0;j<relation_tmp.length;j++) {
					relation_array[0] = new BMap.Point(point_array[relation_tmp[j]].x, point_array[relation_tmp[j]].y);
					relation_array[1] = new BMap.Point(point_array[city_name].x, point_array[city_name].y);
					
					// 线段颜色处理
					var color = '#B44E39';
					if (point_array[city_name].color != undefined && point_array[city_name].color != '') {
						temp = relation_tmp[j];
						var color = point_array[city_name].color[temp] ? point_array[city_name].color[temp] : '#B44E39' ;
						
					}

					// 线段虚实处理
					var strokeStyle = 'solid';
					if (point_array[city_name].style != undefined && point_array[city_name].style != '') {
						temp = relation_tmp[j];
						var strokeStyle = point_array[city_name].style[temp] ? point_array[city_name].style[temp] : 'solid' ;
					}
					
					var tmp_line = new BMap.Polyline(relation_array, {strokeColor:color, strokeWeight:3, strokeOpacity:0.5,strokeStyle:strokeStyle});
					map.addOverlay(tmp_line);
				}
			}

			// 画曲线
			if(point_array[city_name].curveline_relation != undefined && point_array[city_name].curveline_relation != '') {
				var relation_tmp = point_array[city_name].curveline_relation.split('-');
				var relation_array = [];
				
				for(var j = 0;j<relation_tmp.length;j++) {
					var color = '#B44E39';
					if (point_array[city_name].color != undefined && point_array[city_name].color != '') {
						temp = relation_tmp[j];
						var color = point_array[city_name].color[temp] ? point_array[city_name].color[temp] : '#B44E39' ;
					}
					
					relation_array[j] = new BMap.Point(point_array[relation_tmp[j]].x, point_array[relation_tmp[j]].y);
					relation_array[j+1] = new BMap.Point(point_array[city_name].x, point_array[city_name].y);

					var tmp_line = new BMapLib.CurveLine(relation_array, {strokeColor:color, strokeWeight:3, strokeOpacity:0.5});
					
					map.addOverlay(tmp_line);
					
				}
			}
		}
	}
	
	// 飞机的显示逻辑
	 air_opts = {
	  width : 100,           // 信息窗口宽度
	  height: 100,               // 信息窗口高度
	  title : "<font size='1px'>飞行信息</font>" ,  // 信息窗口标题
	  enableMessage:false //取消手机图片
	}

	function remove_airline(map,point_array ){
		for(key in point_array){
			if (!air_marker[key].newflg){
				(function(k){
					map.removeOverlay(air_marker[key]); 
				})(map,key)
			}
		}
	}
	
	

	function set_airline(map,point_array){

		for(key in point_array){

			if (height_set != 0) {
				if (point_array[key].height > height_set) {
					continue;
				}
			}
			
			if(air_marker[key] == undefined) {
				var myIcon = new BMap.Icon("./images/air.png", new BMap.Size(15,15));
				air_marker[key] = new BMap.Marker(point,{icon:myIcon});
				
				map.addOverlay(air_marker[key]);  
				
				var txt = '<font size="1px">航班号：'+ point_array[key].flight+'<br />飞行高度：'+point_array[key].height+'米<br />飞行速度：'+ point_array[key].speed+'公里/小时</font>';
				air_infoWindow[key] = new BMap.InfoWindow(txt, air_opts);  // 创建信息窗口对象
				air_marker[key].addEventListener("mouseover", (function(k){
					return function(){
						air_marker[k].openInfoWindow(air_infoWindow[k]);
					}
				})(key));
				air_marker[key].newflg = true;
			}
			if (height_set != 0) {
				if (point_array[key].height > height_set) {
					continue;
				}
			}
			
			var point = new BMap.Point(point_array[key].x,point_array[key].y);
			if (!map.getBounds().containsPoint(point)) {
				continue;
			}

			// 重新设置坐标
			air_marker[key].setPosition(point);
			air_marker[key].newflg = true;
			var txt = '<font size="1px">航班号：'+ point_array[key].flight+'<br />飞行高度：'+point_array[key].height+'米<br />飞行速度：'+ point_array[key].speed+'公里/小时</font>';
			air_infoWindow[key] = new BMap.InfoWindow(txt, air_opts);  // 创建信息窗口对象

			window.air_marker[key].addEventListener("mouseover", (function(k){
					return function(){
						window.air_marker[k].openInfoWindow(air_infoWindow[k]);
					}
				})(key));
		}

		for(key in point_array){
			if (!air_marker[key].newflg){
				(function(k){
					map.removeOverlay(air_marker[key]); 
				})(map,key)
			}
		}
	}

	window.air_marker = new Array();
	window.air_infoWindow = new Array();



	function paint_airline(map,point_array){
		/*
		for(exists in air_marker) {
				(function(k){
					map.removeOverlay(air_marker[exists]); 
				})(map,exists)
			
		}
		window.air_marker = [];
		*/
		for(key in point_array){

			if (height_set != 0) {
				if (point_array[key].height > height_set) {
					continue;
				}
			}
			var point = new BMap.Point(point_array[key].x,point_array[key].y);
			if (!map.getBounds().containsPoint(point)) {
				continue;
			}
			var myIcon = new BMap.Icon("./images/air.png", new BMap.Size(15,15));
			window.air_marker[key] = new BMap.Marker(point,{icon:myIcon});
			
			map.addOverlay(window.air_marker[key]);  
			
			var txt = '<font size="1px">航班号：'+ point_array[key].flight+'<br />飞行高度：'+point_array[key].height+'米<br />飞行速度：'+ point_array[key].speed+'公里/小时</font>';
			air_infoWindow[key] = new BMap.InfoWindow(txt, air_opts);  // 创建信息窗口对象
			window.air_marker[key].addEventListener("mouseover", (function(k){
				return function(){
					window.air_marker[k].openInfoWindow(air_infoWindow[k]);
				}
			})(key));			
		}
	}


	//var first_control = new BMap.ScaleControl({anchor:BMAP_ANCHOR_TOP_LEFT});

	first_map = new BMap.Map("first_container");
	first_map.id = 'first';
	paint_airline(first_map,air_line);// 画飞机
	first_map.setMapStyle({styleJson:style_json});
	var first_point = new BMap.Point(119.560048, 32.561638); // 创建点坐标（扬州）
	//first_map.addControl(first_control);     // 添加比例尺
	first_map.centerAndZoom(first_point,10);// 初始化地图,设置中心点坐标和地图级别。
	first_map.enableScrollWheelZoom(); //启用滚轮放大缩小
	
	
	first_point_array = {
		// 格式定义：icon：default表示是默认百度的图片。relation：表示该地点的上一级地点的标识
		'benniu':{x:119.7697,y:31.9197,name:'奔牛',name_color:'red',icon:'hollow_circle',relation:'danyang-baqiao',color:{danyang:'blue',baqiao:'blue'}},
		'baqiao':{x:119.8667,y:32.1186,name:'八桥',name_color:'red',icon:'hollow_circle',relation:'xiaoji',color:{xiaoji:'blue'}},
		'xiaoji':{x:119.7619,y:32.6242,name:'小纪',name_color:'red',icon:'hollow_circle',relation:'zheduo',color:{zheduo:'blue'}},
		'zheduo':{x:119.6386,y:32.8836,name:'柘垛',name_color:'red',icon:'hollow_circle',relation:''},
		'gaoba':{x:119.1924,y:32.8005,name:'高靶',name_color:'red',icon:'hollow_circle',relation:'zheduo',color:{zheduo:'blue'}},
		'danyang':{x:119.6063,y:32.0111,name:'丹阳',name_color:'red',icon:'hollow_circle',relation:'gaoba',color:{gaoba:'blue'}},

		// 没有具体坐标的4个点
		'custom00001':{x:119.521816,y:32.923146,name:'',name_color:'red',icon:'black_point',relation:''},
		'custom00002':{x:119.257068,y:32.878766,name:'',name_color:'red',icon:'black_point',relation:'custom00001',curveline_relation:'custom00006',color:{custom00001:'blue',custom00006:'blue'}},
		'custom00003':{x:119.580458,y:32.811062,name:'',name_color:'red',icon:'black_point',relation:'custom00004',curveline_relation:'custom00005',color:{custom00004:'blue',custom00005:'blue'}},
		'custom00004':{x:119.303061,y:32.754724,name:'',name_color:'red',icon:'black_point',relation:''},
		'custom00005':{x:119.546825,y:32.867122,name:'',name_color:'red',icon:'black_point',curveline_relation:'custom00001',color:{custom00001:'blue'}},
		'custom00006':{x:119.280352,y:32.817131,name:'',name_color:'red',icon:'black_point',curveline_relation:'custom00004',color:{custom00004:'blue'}}
	};

	paint_action(first_map,first_point_array);
</script>

<script type="text/javascript">
	
	second_point_array = {
		// 格式定义：icon：default表示是默认百度的图片。relation：表示该地点的上一级地点的标识
		'pixian':{x:117.9767,y:34.3116,name:'邳县',name_color:'red',icon:'hollow_circle',relation:''},
		'lianyungang':{x:119.1117,y:34.5917,name:'连云港',name_color:'red',icon:'hollow_circle',relation:''},
		'xuzhou':{x:117.5483,y:34.0617,name:'徐州',name_color:'red',icon:'hollow_circle',relation:'lianyungang',color:{lianyungang:'green'}},
		'huaian':{x:119.125,y:34.79083,name:'淮安机场',name_color:'red',icon:'hollow_circle',relation:''},
		'bantaji':{x:118.5783,y:32.6733,name:'半塔集',name_color:'red',icon:'hollow_circle',relation:'pixian-lianyungang-yancheng',color:{lianyungang:'green',pixian:'green',yancheng:'green'}},
		'P43':{x:119.1683,y:32.9467,name:'P43',name_color:'red',icon:'red_triangle',relation:'bantaji-pixian-yancheng',color:{bantaji:'green',pixian:'green',yancheng:'green'}},
		'P44':{x:118.7066,y:33.48,name:'P44',name_color:'red',icon:'red_triangle',relation:''},
		'yangzhoujichang':{x:119.725,y:32.5433,name:'扬州机场',name_color:'red',icon:'hollow_circle',relation:''},
		'XUTGU':{x:119.5833,y:32.4767,name:'XUTGU',name_color:'red',icon:'red_triangle',relation:'P43',color:{P43:'green'}},
		'PIMOL':{x:119.7783,y:32.2466,name:'PIMOL',name_color:'red',icon:'red_triangle',relation:'XUTGU',color:{XUTGU:'green'}},
		'UNTAN':{x:120.2916,y:32.2083,name:'UNTAN',name_color:'red',icon:'red_triangle',relation:'PIMOL-benniu',color:{PIMOL:'green',benniu:'green'}},
		'PIKAS':{x:120.7333,y:32.1667,name:'PIKAS',name_color:'red',icon:'red_triangle',relation:'UNTAN-yancheng-nantong',color:{UNTAN:'green',yancheng:'green',nantong:'green'}},
		'nantong':{x:120.98,y:32.0983,name:'南通',name_color:'red',icon:'hollow_circle',relation:''},
		'dajiaochang':{x:118.7917,y:31.9833,name:'大校场',name_color:'red',icon:'hollow_circle',relation:'PIMOL-MADUK',color:{PIMOL:'green',MADUK:'green'}},
		'hefei':{x:116.9766,y:31.9883,name:'合肥',name_color:'red',icon:'hollow_circle',relation:''},
		'MADUK':{x:118.105,y:31.7183,name:'MADUK',name_color:'red',icon:'red_triangle',relation:'hefei',color:{hefei:'green'}},
		'nanjing':{x:118.8619,y:31.7422,name:'南京',name_color:'red',icon:'hollow_circle',relation:''},
		'lishui':{x:119.04,y:31.65,name:'溧水',name_color:'red',icon:'hollow_circle',relation:'bantaji-benniu-MADUK',color:{bantaji:'green',benniu:'green',MADUK:'green'}},
		'benniu':{x:119.7697,y:31.9197,name:'奔牛',name_color:'red',icon:'hollow_circle',relation:'UNTAN',color:{UNTAN:'green'}},
		'wuxi':{x:120.4294,y:31.4947,name:'无锡',name_color:'red',icon:'hollow_circle',relation:'PIMOL-lishui',color:{PIMOL:'green',lishui:'green'}},
		'hognqiao':{x:121.3364,y:31.1978,name:'虹桥',name_color:'red',icon:'hollow_circle',relation:'PIKAS-wuxi',color:{PIKAS:'green',wuxi:'green'}},
		'pudong':{x:121.7925,y:31.1386,name:'浦东',name_color:'red',icon:'hollow_circle',relation:'hognqiao',color:{hognqiao:'green'}},
		'chunlanjichang':{x:119.9692,y:32.4953,name:'春兰机场',name_color:'red',icon:'hollow_circle',relation:''},
		//'gaoyoushi':{x:119.4590,y:32.7815,name:'高邮市',name_color:'red',icon:'hollow_circle',relation:''},
		//'taizhoushi':{x:119.9227,y:32.4551,name:'泰州市',name_color:'red',icon:'hollow_circle',relation:''},
		//'xinghuashi':{x:119.8525,y:32.9105,name:'兴化市',name_color:'red',icon:'hollow_circle',relation:''},
		//'yangzhoushi':{x:119.4130,y:32.3942,name:'扬州市',name_color:'red',icon:'hollow_circle',relation:''},
		//'jiangdushi':{x:119.5715,y:32.4377,name:'江都市',name_color:'red',icon:'hollow_circle',relation:''},
		'yancheng':{x:120.2033,y:33.42611,name:'盐城',name_color:'red',icon:'hollow_circle',relation:'lianyungang',color:{lianyungang:'green'}}
	};

	//paint_action(first_map,second_point_array);
</script>

<script type="text/javascript">
	
	/*
	function showInfo(e){
		alert(e.point.lng + ", " + e.point.lat);
	}
	
	third_map.addEventListener("click", showInfo);
	*/
	third_point_array = {
		// 格式定义：icon：default表示是默认百度的图片。relation：表示该地点的上一级地点的标识
		'P43':{x:119.1683,y:32.9467,name:'P43',name_color:'white',icon:'red_triangle',relation:''},
		'A':{x:118.79194,y:31.9836,name:'A',name_color:'white',icon:'hollow_triangle',relation:'XUTGU',color:{XUTGU:'green'}},
		'B':{x:119.47,y:32.73,name:'B',name_color:'white',icon:'hollow_triangle',relation:'P43',color:{P43:'white'}},
		'XUTGU':{x:119.5833,y:32.4767,name:'XUTGU',name_color:'white',icon:'red_triangle',relation:'P43-B',color:{P43:'white',B:'green'},style:{B:'dashed'}},
		'PIMOL':{x:119.7783,y:32.2466,name:'PIMOL',name_color:'white',icon:'red_triangle',relation:'ZSYA-XUTGU',color:{ZSYA:'white',XUTGU:'white'}},
		'dongtan':{x:119.7672,y:32.9347,name:'东谭',name_color:'white',icon:'',relation:''},
		'tongcheng':{x:118.9381,y:32.895,name:'铜城',name_color:'white',icon:'',relation:'dongtan'}, 
		'qinglan':{x:119.1867,y:32.6017,name:'秦栏',name_color:'white',icon:'hollow_circle',relation:'shierwei-tongcheng'},
		'shierwei':{x:119.2539,y:32.2725,name:'十二圩',name_color:'white',icon:'',relation:'nanxiang'},
		'madian':{x:119.9503,y:32.3622,name:'马甸',name_color:'white',icon:'',relation:'dongtan-shierwei'},
		'tianwangshi':{x:119.215,y:31.7458,name:'天王寺',name_color:'white',icon:'hollow_circle',relation:'daibuzhen'},
		'daibuzhen':{x:119.4925,y:31.3101,name:'戴埠镇',name_color:'white',icon:'hollow_circle',relation:'changzhoudong'},
		'changzhoudong':{x:119.9981,y:31.8052,name:'常州东',name_color:'white',icon:'hollow_circle',relation:'tanxingxi'},
		'tanxingxi':{x:120.0936,y:32.1667,name:'泰兴西',name_color:'white',icon:'hollow_circle',relation:'madian-nanxiang'},
		'YA203':{x:119.6733,y:32.7308,name:'YA203',name_color:'white',icon:'hollow_triangle',relation:''},
		'YA103':{x:119.7675,y:32.39,name:'YA103',name_color:'white',icon:'hollow_triangle',relation:''},
		'YA106':{x:119.5883,y:32.6411,name:'YA106',name_color:'white',icon:'hollow_triangle',relation:''},
		'YA206':{x:119.59,y:32.4636,name:'YA206',name_color:'white',icon:'hollow_triangle',relation:'YA106',color:{YA106:'green'},style:{YA106:'dashed'}},
		'jieshou':{x:119.4162,y:33.0059,name:'界首',name_color:'white',icon:'hollow_circle',relation:'tongcheng',color:{tongcheng:'red'}},
		'ZJ':{x:119.7117,y:31.94,name:'ZJ',name_color:'white',icon:'hollow_circle',relation:'XUTGU-PIMOL',color:{XUTGU:'white',PIMOL:'white'}},
		'VMB':{x:120.19,y:31.7416,name:'VMB',name_color:'white',icon:'hollow_circle',relation:'PIMOL-ZJ',color:{PIMOL:'white',ZJ:'white'}},
		'ZSYA':{x:119.7197,y:32.5633,name:'ZSYA',name_color:'white',icon:'hollow_circle',relation:'B-custom0000C',color:{B:'white',custom0000C:'blue'}},
		'nanxiang':{x:119.254281, y:32.095157,name:'南线',name_color:'white',icon:'',relation:'tianwangshi'},
		
		'custom0000A':{x:118.367762,y:32.76027,name:'',icon:'black_point',relation:'tongcheng',color:{tongcheng:'red'}},
		'custom0000B':{x:119.754458,y:33.076442,name:'',icon:'black_point',relation:'jieshou',color:{jieshou:'red'}},
		'custom0000C':{x:119.605725,y:32.585254,name:'',name_color:'red',icon:'black_point',relation:''},
		'custom0000D':{x:119.833976,y:32.542599,name:'',name_color:'red',icon:'black_point',relation:'ZSYA',color:{ZSYA:'blue'}}
	
	};

	// 批注数据
	var label_array = {
		'label0000A':{x:119.533115,y:33.030929,offset_x:-20,offset_y:-20,text:'济空南空交界线',color:'red',fontsize:'14px',height:'12px',lineHeight:'12px', transform:'rotate(-15deg)'}
	};

	//paint_action(first_map,third_point_array,label_array);
</script>

<script type="text/javascript">

	fourth_point_array = {
	'gaoyoushi':{x:119.4590,y:32.7815,name:'高邮市',name_color:'red',icon:'hollow_circle',relation:''},
	'taizhoushi':{x:119.9227,y:32.4551,name:'泰州市',name_color:'red',icon:'hollow_circle',relation:''},
	'xinghuashi':{x:119.8525,y:32.9105,name:'兴化市',name_color:'red',icon:'hollow_circle',relation:''},
	'yangzhoushi':{x:119.4130,y:32.3942,name:'扬州市',name_color:'red',icon:'hollow_circle',relation:''},
	'jiangdushi':{x:119.5715,y:32.4377,name:'江都市',name_color:'red',icon:'hollow_circle',relation:''}
	};

	//paint_action(first_map,fourth_point_array);
</script>
</body>
</html>
